package kr.or.javacafe.code.dao;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.orm.ibatis.SqlMapClientTemplate;
import org.springframework.stereotype.Repository;

import kr.or.javacafe.code.domain.CodeCategory;

@Repository
public class CodeCategoryDAOImpl implements CodeCategoryDAO {
	private static final String NAMESPACE = "code.";

	@Autowired
	private SqlMapClientTemplate sqlMapClientTemplate;

	public SqlMapClientTemplate getSqlMapClientTemplate() {
		return sqlMapClientTemplate;
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<CodeCategory> selectCodeCategory(CodeCategory objCodeCategory) {
		return getSqlMapClientTemplate().queryForList(NAMESPACE + "selectCodeCategory", objCodeCategory);
	}
}